.TH "fw1394Camera" 3 "13 Oct 2009" "Version 2" "zebulon" \" -*- nroff -*-
.ad l
.nh
.SH NAME
fw1394Camera \- 
.PP
class for firewire ieee1394 video devices using libdc1394-2.x api.  

.SH SYNOPSIS
.br
.PP
.PP
\fC#include <fw1394Camera.h>\fP
.PP
Inherits \fBfwCamera\fP.
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBfw1394TwoVideoModeType\fP { \fBfwVIDEO_MODE_160x120_YUV444\fP =  DC1394_VIDEO_MODE_160x120_YUV444, \fBfwVIDEO_MODE_320x240_YUV422\fP =  DC1394_VIDEO_MODE_320x240_YUV422, \fBfwVIDEO_MODE_640x480_YUV411\fP =  DC1394_VIDEO_MODE_640x480_YUV411, \fBfwVIDEO_MODE_640x480_YUV422\fP =  DC1394_VIDEO_MODE_640x480_YUV422, \fBfwVIDEO_MODE_640x480_RGB8\fP =  DC1394_VIDEO_MODE_640x480_RGB8, \fBfwVIDEO_MODE_640x480_MONO8\fP =  DC1394_VIDEO_MODE_640x480_MONO8, \fBfwVIDEO_MODE_640x480_MONO16\fP =  DC1394_VIDEO_MODE_640x480_MONO16, \fBfwVIDEO_MODE_800x600_YUV422\fP =  DC1394_VIDEO_MODE_800x600_YUV422, \fBfwVIDEO_MODE_800x600_RGB8\fP =  DC1394_VIDEO_MODE_800x600_RGB8, \fBfwVIDEO_MODE_800x600_MONO8\fP =  DC1394_VIDEO_MODE_800x600_MONO8, \fBfwVIDEO_MODE_1024x768_YUV422\fP =  DC1394_VIDEO_MODE_1024x768_YUV422, \fBfwVIDEO_MODE_1024x768_RGB8\fP =  DC1394_VIDEO_MODE_1024x768_RGB8, \fBfwVIDEO_MODE_1024x768_MONO8\fP =  DC1394_VIDEO_MODE_1024x768_MONO8, \fBfwVIDEO_MODE_800x600_MONO16\fP =  DC1394_VIDEO_MODE_800x600_MONO16, \fBfwVIDEO_MODE_1024x768_MONO16\fP =  DC1394_VIDEO_MODE_1024x768_MONO16, \fBfwVIDEO_MODE_1280x960_YUV422\fP =  DC1394_VIDEO_MODE_1280x960_YUV422, \fBfwVIDEO_MODE_1280x960_RGB8\fP =  DC1394_VIDEO_MODE_1280x960_RGB8, \fBfwVIDEO_MODE_1280x960_MONO8\fP =  DC1394_VIDEO_MODE_1280x960_MONO8, \fBfwVIDEO_MODE_1600x1200_YUV422\fP =  DC1394_VIDEO_MODE_1600x1200_YUV422, \fBfwVIDEO_MODE_1600x1200_RGB8\fP =  DC1394_VIDEO_MODE_1600x1200_RGB8, \fBfwVIDEO_MODE_1600x1200_MONO8\fP =  DC1394_VIDEO_MODE_1600x1200_MONO8, \fBfwVIDEO_MODE_1280x960_MONO16\fP =  DC1394_VIDEO_MODE_1280x960_MONO16, \fBfwVIDEO_MODE_1600x1200_MONO16\fP =  DC1394_VIDEO_MODE_1600x1200_MONO16, \fBfwVIDEO_MODE_EXIF\fP =  DC1394_VIDEO_MODE_EXIF, \fBfwVIDEO_MODE_FORMAT7_0\fP =  DC1394_VIDEO_MODE_FORMAT7_0, \fBfwVIDEO_MODE_FORMAT7_1\fP =  DC1394_VIDEO_MODE_FORMAT7_1, \fBfwVIDEO_MODE_FORMAT7_2\fP =  DC1394_VIDEO_MODE_FORMAT7_2, \fBfwVIDEO_MODE_FORMAT7_3\fP =  DC1394_VIDEO_MODE_FORMAT7_3, \fBfwVIDEO_MODE_FORMAT7_4\fP =  DC1394_VIDEO_MODE_FORMAT7_4, \fBfwVIDEO_MODE_FORMAT7_5\fP =  DC1394_VIDEO_MODE_FORMAT7_5, \fBfwVIDEO_MODE_FORMAT7_6\fP =  DC1394_VIDEO_MODE_FORMAT7_6, \fBfwVIDEO_MODE_FORMAT7_7\fP =  DC1394_VIDEO_MODE_FORMAT7_7 }"
.br
.ti -1c
.RI "enum \fBfw1394TwoFramerateType\fP { \fBfwFRAMERATE_1_875\fP =  DC1394_FRAMERATE_1_875, \fBfwFRAMERATE_3_75\fP =  DC1394_FRAMERATE_3_75, \fBfwFRAMERATE_7_5\fP =  DC1394_FRAMERATE_7_5, \fBfwFRAMERATE_15\fP =  DC1394_FRAMERATE_15, \fBfwFRAMERATE_30\fP =  DC1394_FRAMERATE_30, \fBfwFRAMERATE_60\fP =  DC1394_FRAMERATE_60, \fBfwFRAMERATE_120\fP =  DC1394_FRAMERATE_120, \fBfwFRAMERATE_240\fP =  DC1394_FRAMERATE_240 }"
.br
.ti -1c
.RI "enum \fBfw1394TwoColorCodingType\fP { \fBfwCOLOR_CODING_MONO8\fP =  DC1394_COLOR_CODING_MONO8, \fBfwCOLOR_CODING_YUV411\fP =  DC1394_COLOR_CODING_YUV411, \fBfwCOLOR_CODING_YUV422\fP =  DC1394_COLOR_CODING_YUV422, \fBfwCOLOR_CODING_YUV444\fP =  DC1394_COLOR_CODING_YUV444, \fBfwCOLOR_CODING_RGB8\fP =  DC1394_COLOR_CODING_RGB8, \fBfwCOLOR_CODING_MONO16\fP =  DC1394_COLOR_CODING_MONO16, \fBfwCOLOR_CODING_RGB16\fP =  DC1394_COLOR_CODING_RGB16, \fBfwCOLOR_CODING_MONO16S\fP =  DC1394_COLOR_CODING_MONO16S, \fBfwCOLOR_CODING_RGB16S\fP =  DC1394_COLOR_CODING_RGB16S, \fBfwCOLOR_CODING_RAW8\fP =  DC1394_COLOR_CODING_RAW8, \fBfwCOLOR_CODING_RAW16\fP =  DC1394_COLOR_CODING_RAW16 }"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBfw1394Camera\fP (unsigned int camera_id)"
.br
.ti -1c
.RI "virtual \fB~fw1394Camera\fP ()"
.br
.ti -1c
.RI "void \fBsetCamera\fP (unsigned int camera)"
.br
.ti -1c
.RI "void \fBgetCamera\fP (unsigned int &camera)"
.br
.ti -1c
.RI "void \fBgetNumCameras\fP (unsigned int &ncameras)"
.br
.ti -1c
.RI "void \fBsetVideoMode\fP (\fBfw1394TwoVideoModeType\fP videomode)"
.br
.ti -1c
.RI "void \fBgetVideoMode\fP (\fBfw1394TwoVideoModeType\fP &videomode)"
.br
.ti -1c
.RI "int \fBgetVideoModeSupported\fP (\fBfwList\fP< \fBfw1394TwoVideoModeType\fP > &videomodes)"
.br
.ti -1c
.RI "bool \fBisVideoModeFormat7\fP (\fBfw1394TwoVideoModeType\fP videomode)"
.br
.ti -1c
.RI "bool \fBisColor\fP ()"
.br
.ti -1c
.RI "void \fBsetFramerate\fP (\fBfw1394TwoFramerateType\fP fps)"
.br
.ti -1c
.RI "void \fBgetFramerate\fP (\fBfw1394TwoFramerateType\fP &fps)"
.br
.ti -1c
.RI "int \fBgetFramerateSupported\fP (\fBfw1394TwoVideoModeType\fP videomode, \fBfwList\fP< \fBfw1394TwoFramerateType\fP > &fps)"
.br
.ti -1c
.RI "void \fBsetColorCoding\fP (\fBfw1394TwoColorCodingType\fP coding)"
.br
.ti -1c
.RI "void \fBgetColorCoding\fP (\fBfw1394TwoColorCodingType\fP &coding)"
.br
.ti -1c
.RI "int \fBgetColorCodingSupported\fP (\fBfw1394TwoVideoModeType\fP videomode, \fBfwList\fP< \fBfw1394TwoColorCodingType\fP > &codings)"
.br
.ti -1c
.RI "void \fBsetFormat7ROI\fP (unsigned int left=0, unsigned int top=0, unsigned int \fBwidth\fP=0, unsigned int \fBheight\fP=0)"
.br
.ti -1c
.RI "void \fBprintCameraInfo\fP ()"
.br
.ti -1c
.RI "dc1394video_frame_t * \fBdequeue\fP ()"
.br
.ti -1c
.RI "void \fBenqueue\fP (dc1394video_frame_t *frame)"
.br
.ti -1c
.RI "void \fBacquire\fP (unsigned char *I)"
.br
.ti -1c
.RI "void \fBsetFeature\fP (unsigned int gain, dc1394feature_t \fBfeature\fP)"
.br
.ti -1c
.RI "void \fBgetFeature\fP (unsigned int &min_gain, unsigned int &gain, unsigned int &max_gain, dc1394feature_t \fBfeature\fP)"
.br
.ti -1c
.RI "void \fBgetWidth\fP (unsigned int &\fBwidth\fP)"
.br
.ti -1c
.RI "void \fBgetHeight\fP (unsigned int &\fBheight\fP)"
.br
.ti -1c
.RI "void \fBclose\fP ()"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static std::string \fBvideoMode2string\fP (\fBfw1394TwoVideoModeType\fP videomode)"
.br
.ti -1c
.RI "static std::string \fBframerate2string\fP (\fBfw1394TwoFramerateType\fP fps)"
.br
.ti -1c
.RI "static std::string \fBcolorCoding2string\fP (\fBfw1394TwoColorCodingType\fP colorcoding)"
.br
.ti -1c
.RI "static \fBfw1394TwoVideoModeType\fP \fBstring2videoMode\fP (std::string videomode)"
.br
.ti -1c
.RI "static \fBfw1394TwoFramerateType\fP \fBstring2framerate\fP (std::string fps)"
.br
.ti -1c
.RI "static \fBfw1394TwoColorCodingType\fP \fBstring2colorCoding\fP (std::string colorcoding)"
.br
.in -1c
.SS "Static Public Attributes"

.in +1c
.ti -1c
.RI "static const int \fBNUM_BUFFERS\fP = 8"
.br
.ti -1c
.RI "static const char * \fBstrVideoMode\fP [DC1394_VIDEO_MODE_NUM]"
.br
.ti -1c
.RI "static const char * \fBstrFramerate\fP [DC1394_FRAMERATE_NUM]"
.br
.ti -1c
.RI "static const char * \fBstrColorCoding\fP [DC1394_COLOR_CODING_NUM]"
.br
.in -1c
.SH "Detailed Description"
.PP 
class for firewire ieee1394 video devices using libdc1394-2.x api. 

Needs libraw1394-1.2.0 and libdc1394-2.0.0 or more recent versions available on http://sourceforge.net.
.PP
This class was tested with Marlin F033C and F131B cameras and with Point Grey Dragonfly 2 camera.
.PP
This grabber allows single or multi camera acquisition. An example of a single camera acquisition is given in \fBfw1394Camera()\fP. An example of multi camera acquisition is available in setCamera().
.PP
.IP "\(bu" 2
Here an example of single capture from the first camera found on the bus:: 
.PP
.nf
  fwImage<unsigned char> I;
  fw1394Camera g;
  g.setVideoMode(fw1394Camera::fwVIDEO_MODE_640x480_MONO8);
  g.setFramerate(fw1394Camera::fwFRAMERATE_60);
  while(1)
    g.acquire(I);

.fi
.PP

.PP
.PP
.IP "\(bu" 2
Here an example of multi camera capture: 
.PP
.nf
  unsigned int ncameras; // Number of cameras on the bus
  fw1394Camera g;
  g.getNumCameras(ncameras);
  fwImage<unsigned char> *I = new fwImage<unsigned char> [ncameras];

  // If the first camera supports fwVIDEO_MODE_640x480_YUV422 video mode
  g.setCamera(0);
  g.setVideoMode(fw1394Camera::fwVIDEO_MODE_640x480_YUV422);

  // If the second camera support 30 fps acquisition
  g.setCamera(1);
  g.setFramerate(fw1394Camera::fwFRAMERATE_30);

  while(1) {
    for (unsigned int camera=0; camera < ncameras; camera ++) {
      // Acquire alternatively images from camera 0 and from camera 1
      g.setCamera(camera);
      g.acquire(I[camera]);
    }
  }
  delete [] I;

.fi
.PP

.PP
.PP
\fBAuthor:\fP
.RS 4
Fabien Spindler (Fabien.Spindler@irisa.fr), Irisa / Inria Rennes 
.RE
.PP

.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBfw1394Camera::fw1394TwoColorCodingType\fP"Enumeration of color codings. See libdc1394 2.x header file dc1394/control.h 
.SS "enum \fBfw1394Camera::fw1394TwoFramerateType\fP"Enumeration of framerates. See libdc1394 2.x header file dc1394/control.h 
.SS "enum \fBfw1394Camera::fw1394TwoVideoModeType\fP"Enumeration of video modes. See libdc1394 2.x header file dc1394/control.h 
.SH "Constructor & Destructor Documentation"
.PP 
.SS "fw1394Camera::fw1394Camera (unsigned int camera_id)"Default constructor.
.PP
By default:
.IP "\(bu" 2
the camera is the first found on the bus.
.PP
.PP
Current camera settings can be changed using setCamera() to select the active camera on the bus and than \fBsetVideoMode()\fP or \fBsetFramerate()\fP to fix the active camera settings. The list of supported video modes and framerates is available using respectively \fBgetVideoModeSupported()\fP and \fBgetFramerateSupported()\fP.
.PP
.PP
.nf
  fwImage<unsigned char> I;
  fw1394Camera g;
  g.setVideoMode(fw1394Camera::fwVIDEO_MODE_640x480_MONO8);
  g.setFramerate(fw1394Camera::fwFRAMERATE_15);
  while(1)
    g.acquire(I);
.fi
.PP
.PP
\fBSee also:\fP
.RS 4
setCamera(), \fBsetVideoMode()\fP, \fBsetFramerate()\fP 
.RE
.PP

.SS "fw1394Camera::~fw1394Camera ()\fC [virtual]\fP"Destructor.
.PP
Close the firewire grabber.
.PP
\fBSee also:\fP
.RS 4
\fBclose()\fP 
.RE
.PP

.SH "Member Function Documentation"
.PP 
.SS "void fw1394Camera::acquire (unsigned char * I)"Acquire a grey level image from the active camera.
.PP
\fBParameters:\fP
.RS 4
\fII\fP : Image data structure (8 bits image).
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::initializationError\fP : If no camera found on the bus or if can't get camera settings.
.br
\fIfwCameraException::otherError\fP : If format conversion to return a 8 bits image is not implemented.
.RE
.PP
\fBSee also:\fP
.RS 4
setCamera(), \fBsetVideoMode()\fP, \fBsetFramerate()\fP, \fBdequeue()\fP, \fBenqueue()\fP 
.RE
.PP

.SS "void fw1394Camera::close ()\fC [virtual]\fP"Close the firewire grabber.
.PP
Stops the capture and the iso transmission of the active cameras and than release the cameras. 
.PP
Implements \fBfwCamera\fP.
.SS "std::string fw1394Camera::colorCoding2string (\fBfw1394TwoColorCodingType\fP colorcoding)\fC [static]\fP"Converts the color coding identifier into a string containing the description of the color coding.
.PP
\fBParameters:\fP
.RS 4
\fIcolorcoding\fP : The color coding format.
.RE
.PP
\fBReturns:\fP
.RS 4
A string describing the color coding, an empty string if the color coding is not supported.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBstring2colorCoding()\fP 
.RE
.PP

.SS "dc1394video_frame_t * fw1394Camera::dequeue ()"Get an image from the active camera frame buffer. This buffer neads to be released by \fBenqueue()\fP.
.PP
\fBReturns:\fP
.RS 4
Pointer to the libdc1394-2.x image data structure.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::initializationError\fP : If no camera found on the bus.
.RE
.PP
.PP
.nf
  fw1394Camera g;
  dc1394video_frame_t *frame;
  g.setVideoMode(fw1394Camera::fwVIDEO_MODE_640x480_MONO8);
  g.setFramerate(fw1394Camera::fwFRAMERATE_15);
  while(1) {
    frame = g.dequeue();
    // Current image is now in frame structure
    g.enqueue(frame);
  }
.fi
.PP
.PP
\fBSee also:\fP
.RS 4
\fBenqueue()\fP 
.RE
.PP

.SS "void fw1394Camera::enqueue (dc1394video_frame_t * frame)"Release the frame buffer used by the active camera.
.PP
\fBParameters:\fP
.RS 4
\fIframe\fP : Pointer to the libdc1394-2.x image data structure.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::initializationError\fP : If no camera found on the bus.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBdequeue()\fP 
.RE
.PP

.SS "std::string fw1394Camera::framerate2string (\fBfw1394TwoFramerateType\fP fps)\fC [static]\fP"Converts the framerate identifier into a string containing the description of the framerate.
.PP
\fBParameters:\fP
.RS 4
\fIfps\fP : The camera capture framerate.
.RE
.PP
\fBReturns:\fP
.RS 4
A string describing the framerate, an empty string if the framerate is not supported.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBstring2framerate()\fP 
.RE
.PP

.SS "void fw1394Camera::getColorCoding (\fBfw1394TwoColorCodingType\fP & coding)"Query the actual color coding of the active camera. The camera supported color codings are given by \fBgetColorCodingSupported()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIcoding\fP : The camera capture color coding.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::initializationError\fP : If no camera found on the bus.
.br
\fIfwCameraException::settingError\fP : If we can't get the actual color coding. Occurs if current video mode is fw1394Camera::fwVIDEO_MODE_EXIF (format 6).
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetColorCoding()\fP, \fBgetColorCodingSupported()\fP, setCamera() 
.RE
.PP

.SS "int fw1394Camera::getColorCodingSupported (\fBfw1394TwoVideoModeType\fP mode, \fBfwList\fP< \fBfw1394TwoColorCodingType\fP > & codings)"Query the available color codings for the given camera video mode (see file dc1394/control.h).
.PP
\fBParameters:\fP
.RS 4
\fImode\fP : Camera video mode.
.br
\fIcodings\fP : The list of supported color codings for the given camera video mode.
.RE
.PP
\fBReturns:\fP
.RS 4
The number of supported color codings, 0 if no color codings is available.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::initializationError\fP : If no camera found on the bus.
.br
\fIfwCameraException::settingError\fP : If we can't get the color codingss.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetColorCoding()\fP, \fBgetColorCoding()\fP, setCamera() 
.RE
.PP

.SS "void fw1394Camera::getFeature (unsigned int & min_gain, unsigned int & gain, unsigned int & max_gain, dc1394feature_t feature)"Query the actual gain value of a given camera and the bounded gain values.
.PP
\fBWarning:\fP
.RS 4
Before requerying the gain a handle must be created by calling open(), and a camera must be connected.
.RE
.PP
\fBParameters:\fP
.RS 4
\fImin_gain\fP : Minimal autorized gain value.
.br
\fIgain\fP : The current camera gain value. This value is comprised between \fImin_gain\fP and \fImax_gain\fP.
.br
\fImax_gain\fP : Maximal autorized gain value.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::settingError\fP :If the required camera is not present or if an error occurs.
.RE
.PP
\fBSee also:\fP
.RS 4
setGain(), open(), \fBgetNumCameras()\fP, setCamera() 
.RE
.PP

.SS "void fw1394Camera::getFramerate (\fBfw1394TwoFramerateType\fP & fps)"Query the actual camera framerate of the active camera. The camera supported framerates are given by \fBgetFramerateSupported()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIfps\fP : The camera capture framerate.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::initializationError\fP : If no camera found on the bus.
.br
\fIfwCameraException::settingError\fP : If we can't get the framerate.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetFramerate()\fP, \fBgetFramerateSupported()\fP, setCamera() 
.RE
.PP

.SS "int fw1394Camera::getFramerateSupported (\fBfw1394TwoVideoModeType\fP mode, \fBfwList\fP< \fBfw1394TwoFramerateType\fP > & fps)"Query the available framerates for the given camera video mode (see file dc1394/control.h). No framerate is associated to the following camera modes :
.PP
.IP "\(bu" 2
fw1394Camera::fwVIDEO_MODE_EXIF (format 6),
.IP "\(bu" 2
fw1394Camera::fwVIDEO_MODE_FORMAT7_0 (format 7):
.IP "\(bu" 2
fw1394Camera::fwVIDEO_MODE_FORMAT7_1 (format 7)
.IP "\(bu" 2
fw1394Camera::fwVIDEO_MODE_FORMAT7_2 (format 7)
.IP "\(bu" 2
fw1394Camera::fwVIDEO_MODE_FORMAT7_3 (format 7)
.IP "\(bu" 2
fw1394Camera::fwVIDEO_MODE_FORMAT7_4 (format 7)
.IP "\(bu" 2
fw1394Camera::fwVIDEO_MODE_FORMAT7_5 (format 7)
.IP "\(bu" 2
fw1394Camera::fwVIDEO_MODE_FORMAT7_6 (format 7)
.IP "\(bu" 2
fw1394Camera::fwVIDEO_MODE_FORMAT7_7 (format 7)
.PP
.PP
\fBParameters:\fP
.RS 4
\fImode\fP : Camera video mode.
.br
\fIfps\fP : The list of supported camera framerates for the given camera video mode.
.RE
.PP
\fBReturns:\fP
.RS 4
The number of supported framerates, 0 if no framerate is available.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::initializationError\fP : If no camera found on the bus.
.br
\fIfwCameraException::settingError\fP : If we can't get the supported framerates.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetFramerate()\fP, \fBgetFramerate()\fP, setCamera() 
.RE
.PP

.SS "void fw1394Camera::getHeight (unsigned int & height)"Get the image height. It depends on the camera vide mode \fBsetVideoMode()\fP. The image size is only available after a call to open() or \fBacquire()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIheight\fP : The image width.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::initializationError\fP : If no camera found on the bus.
.RE
.PP
\fBWarning:\fP
.RS 4
Has to be called after open() or \fBacquire()\fP to be sure that camera settings are send to the camera.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBgetWidth()\fP 
.RE
.PP

.SS "void fw1394Camera::getNumCameras (unsigned int & ncameras)"Return the number of cameras connected on the bus.
.PP
\fBParameters:\fP
.RS 4
\fIncameras\fP : The number of cameras found on the bus. 
.RE
.PP

.SS "void fw1394Camera::getVideoMode (\fBfw1394TwoVideoModeType\fP & videomode)"Query the actual capture video mode of the active camera. All the active camera supported modes are given by \fBgetVideoModeSupported()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIvideomode\fP : The camera capture video mode.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::initializationError\fP : If the required camera is not present.
.br
\fIfwCameraException::settingError\fP : If we can't get the camera actual video mode.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetVideoMode()\fP, \fBgetVideoModeSupported()\fP, setCamera() 
.RE
.PP

.SS "int fw1394Camera::getVideoModeSupported (\fBfwList\fP< \fBfw1394TwoVideoModeType\fP > & videomodes)"Query the available active camera video modes.
.PP
\fBParameters:\fP
.RS 4
\fIvideomodes\fP : The list of supported camera video modes.
.RE
.PP
\fBReturns:\fP
.RS 4
The number of supported camera modes, 0 if an error occurs.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::initializationError\fP : If no camera found on the bus.
.br
\fIfwCameraException::settingError\fP : If we can't get video modes.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetVideoMode()\fP, \fBgetVideoMode()\fP, getCamera() 
.RE
.PP

.SS "void fw1394Camera::getWidth (unsigned int & width)"Get the image width. It depends on the camera video mode \fBsetVideoMode()\fP. The image size is only available after a call to open() or \fBacquire()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIwidth\fP : The image width, zero if the required camera is not avalaible.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::initializationError\fP : If no camera found on the bus.
.RE
.PP
\fBWarning:\fP
.RS 4
Has to be called after open() or \fBacquire()\fP to be sure that camera settings are send to the camera.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBgetHeight()\fP, open(), \fBacquire()\fP 
.RE
.PP

.SS "bool fw1394Camera::isColor ()"Indicates if the active camera is grabbing color or grey images.
.PP
We consider color images if the color coding is either YUV (411, 422, 444) or RGB (8, 16, 16S). We consider grey images if the color coding is MONO (8, 16, 16S) or RAW (8, 16). fw1394TwoColorCodingType gives the supported color codings.
.PP
\fBReturns:\fP
.RS 4
true : If color images are acquired. 
.PP
false : If grey images are acquired.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBgetColorCoding()\fP, setCamera() 
.RE
.PP

.SS "bool fw1394Camera::isVideoModeFormat7 (\fBfw1394TwoVideoModeType\fP videomode)"Indicates if the video mode is format 7.
.PP
\fBReturns:\fP
.RS 4
true : If the video mode is scalable (Format 7). 
.PP
false : If the video mode is not Format 7 like.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetVideoMode()\fP, \fBgetVideoModeSupported()\fP, setCamera() 
.RE
.PP

.SS "void fw1394Camera::printCameraInfo ()"Display camera information for the active camera.
.PP
\fBSee also:\fP
.RS 4
setCamera() 
.RE
.PP

.SS "void fw1394Camera::setColorCoding (\fBfw1394TwoColorCodingType\fP coding)"Set the active camera Format 7 color coding.
.PP
The iso transmission (setTransmission()) and the dma capture (see setCapture()) are first stopped. Then, the active camera Format 7 is set. Finaly, the dma capture and the iso transmission are re-started.
.PP
\fBWarning:\fP
.RS 4
Setting color coding for non format 7 video mode will be without effect.
.RE
.PP
\fBParameters:\fP
.RS 4
\fIcoding\fP : The camera color coding for Format 7 video mode. The current color coding of the camera is given by \fBgetColorCoding()\fP. The camera supported color codings are given by \fBgetColorCodingSupported()\fP.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::initializationError\fP : If no camera found on the bus.
.br
\fIfwCameraException::settingError\fP : If we can't set the color coding for Format 7 video mode.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBgetColorCoding()\fP, \fBgetColorCodingSupported()\fP , setCamera() 
.RE
.PP

.SS "void fw1394Camera::setFeature (unsigned int gain, dc1394feature_t feature)"Set the gain for a given camera.
.PP
\fBWarning:\fP
.RS 4
Before setting the gain a handle must be created by calling open(), and a camera must be connected.
.RE
.PP
\fBParameters:\fP
.RS 4
\fIgain\fP The gain value to apply to the camera.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::settingError\fP : If the required camera is not present or if an error occurs.
.RE
.PP
\fBSee also:\fP
.RS 4
getGain(), \fBgetNumCameras()\fP, setCamera() 
.RE
.PP

.SS "void fw1394Camera::setFormat7ROI (unsigned int left = \fC0\fP, unsigned int top = \fC0\fP, unsigned int width = \fC0\fP, unsigned int height = \fC0\fP)"Set the grabbed region of interest ie roi position and size for format 7 video mode.
.PP
The iso transmission (setTransmission()) and the dma capture (see setCapture()) are first stopped. Then, the format 7 roi is set. Finaly, the dma capture and the iso transmission are re-started.
.PP
\fBWarning:\fP
.RS 4
Setting format 7 roi takes only effect if video mode is format 7 like.
.RE
.PP
\fBParameters:\fP
.RS 4
\fIleft\fP : Position of the upper left roi corner.
.br
\fItop\fP : Position of the upper left roi corner.
.br
\fIwidth\fP : Roi width. If width is set to 0, uses the maximum allowed image width.
.br
\fIheight\fP : Roi height. If width is set to 0, uses the maximum allowed image height.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::initializationError\fP : If no camera found on the bus.
.br
\fIfwCameraException::settingError\fP : If we can't set roi.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBisVideoModeFormat7()\fP 
.RE
.PP

.SS "void fw1394Camera::setFramerate (\fBfw1394TwoFramerateType\fP fps)"Set the active camera framerate for non scalable video modes.
.PP
The iso transmission (setTransmission()) and the dma capture (see setCapture()) are first stopped. Then, the camera framerate capture mode is set. Finaly, the dma capture and the iso transmission are re-started.
.PP
If the current video mode is scalable (Format 7), this function is without effect.
.PP
\fBParameters:\fP
.RS 4
\fIfps\fP : The camera framerate. The current framerate of the camera is given by \fBgetFramerate()\fP. The camera supported framerates are given by \fBgetFramerateSupported()\fP.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::initializationError\fP : If no camera found on the bus.
.br
\fIfwCameraException::settingError\fP : If we can't set the framerate.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBgetFramerate()\fP, \fBgetFramerateSupported()\fP , setCamera() 
.RE
.PP

.SS "void fw1394Camera::setVideoMode (\fBfw1394TwoVideoModeType\fP videomode)"Set the camera video capture mode. Image size is than updated with respect to the new video capture mode.
.PP
The iso transmission (setTransmission()) and the dma capture (see setCapture()) are first stopped. Then, the camera video capture mode is set. Finaly, the dma capture and the iso transmission are re-started.
.PP
\fBParameters:\fP
.RS 4
\fIvideomode\fP : The camera video capture mode. The current camera mode is given by \fBgetVideoMode()\fP. The camera supported modes are given by \fBgetVideoModeSupported()\fP.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::initializationError\fP : If no camera found on the bus.
.br
\fIfwCameraException::settingError\fP : If we can't set the video mode.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBgetVideoMode()\fP, \fBgetVideoModeSupported()\fP, setCamera() 
.RE
.PP

.SS "\fBfw1394Camera::fw1394TwoColorCodingType\fP fw1394Camera::string2colorCoding (std::string colorcoding)\fC [static]\fP"Converts the string containing the description of the color coding into the color coding identifier.
.PP
\fBParameters:\fP
.RS 4
\fIcolorcoding\fP : The string describing the color coding format.
.RE
.PP
\fBReturns:\fP
.RS 4
The camera capture color coding identifier.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::settingError\fP : If the required color coding is not valid.
.RE
.PP
This method returns 0 if the string does not match to a color coding string.
.PP
\fBSee also:\fP
.RS 4
\fBcolorCoding2string()\fP 
.RE
.PP

.SS "\fBfw1394Camera::fw1394TwoFramerateType\fP fw1394Camera::string2framerate (std::string framerate)\fC [static]\fP"Converts the string containing the description of the framerate into the framerate identifier.
.PP
\fBParameters:\fP
.RS 4
\fIframerate\fP : The string describing the framerate.
.RE
.PP
\fBReturns:\fP
.RS 4
The camera capture framerate identifier.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::settingError\fP : If the required framerate is not valid.
.RE
.PP
This method returns 0 if the string does not match to a framerate string.
.PP
\fBSee also:\fP
.RS 4
\fBframerate2string()\fP 
.RE
.PP

.SS "\fBfw1394Camera::fw1394TwoVideoModeType\fP fw1394Camera::string2videoMode (std::string videomode)\fC [static]\fP"Converts the string containing the description of the vide mode into the video mode identifier.
.PP
\fBParameters:\fP
.RS 4
\fIvideomode\fP : The string describing the video mode.
.RE
.PP
\fBReturns:\fP
.RS 4
The camera capture video mode identifier.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIfwCameraException::settingError\fP : If the required videomode is not valid.
.RE
.PP
This method returns 0 if the string does not match to a video mode string.
.PP
\fBSee also:\fP
.RS 4
\fBvideoMode2string()\fP 
.RE
.PP

.SS "std::string fw1394Camera::videoMode2string (\fBfw1394TwoVideoModeType\fP videomode)\fC [static]\fP"Converts the video mode identifier into a string containing the description of the mode.
.PP
\fBParameters:\fP
.RS 4
\fIvideomode\fP : The camera capture video mode.
.RE
.PP
\fBReturns:\fP
.RS 4
A string describing the mode, an empty string if the mode is not supported.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBstring2videoMode()\fP 
.RE
.PP

.SH "Member Data Documentation"
.PP 
.SS "const int \fBfw1394Camera::NUM_BUFFERS\fP = 8\fC [static]\fP"Number of buffers 
.SS "const char * fw1394Camera::strColorCoding\fC [static]\fP"\fBInitial value:\fP
.PP
.nf
 {
  'COLOR_CODING_MONO8',
  'COLOR_CODING_YUV411',
  'COLOR_CODING_YUV422',
  'COLOR_CODING_YUV444',
  'COLOR_CODING_RGB8',
  'COLOR_CODING_MONO16',
  'COLOR_CODING_RGB16',
  'COLOR_CODING_MONO16S',
  'COLOR_CODING_RGB16S',
  'COLOR_CODING_RAW8',
  'COLOR_CODING_RAW16',
}
.fi
.SS "const char * fw1394Camera::strFramerate\fC [static]\fP"\fBInitial value:\fP
.PP
.nf
 {
  'FRAMERATE_1_875',
  'FRAMERATE_3_75',
  'FRAMERATE_7_5',
  'FRAMERATE_15',
  'FRAMERATE_30',
  'FRAMERATE_60',
  'FRAMERATE_120',
  'FRAMERATE_240'
}
.fi


.SH "Author"
.PP 
Generated automatically by Doxygen for zebulon from the source code.
